* screen space to better use. If the underlying window system does not
* support the request, the setting will not have any effect.
*
+ * Note that custom titlebars set with gtk_window_set_titlebar() are
+ * not affected by this. The application is in full control of their
+ * content and visibility anyway.
+ *
* Since: 3.4
**/
void
if (priv->title_box == NULL)
return FALSE;
- visible = !priv->fullscreen && !(priv->maximized && priv->hide_titlebar_when_maximized);
+ visible = !priv->fullscreen &&
+ !(priv->titlebar == priv->title_box &&
+ priv->maximized &&
+ priv->hide_titlebar_when_maximized);
gtk_widget_set_child_visible (priv->title_box, visible);
+
return visible;
}
update_opaque_region (window, &window_border, &child_allocation);
if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box) &&
priv->decorated &&
!priv->fullscreen)
{
{
get_shadow_width (widget, &window_border);
- if (priv->title_box != NULL)
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box))
gtk_widget_get_preferred_width (priv->title_box,
&title_min, &title_nat);
{
get_shadow_width (widget, &window_border);
- if (priv->title_box != NULL)
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box))
gtk_widget_get_preferred_width_for_height (priv->title_box,
height,
&title_min, &title_nat);
{
get_shadow_width (widget, &window_border);
- if (priv->title_box != NULL)
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box))
gtk_widget_get_preferred_height (priv->title_box,
&title_min,
&title_height);
{
get_shadow_width (widget, &window_border);
- if (priv->title_box != NULL)
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box))
gtk_widget_get_preferred_height_for_width (priv->title_box,
width,
&title_min,